CREATE TABLE [dbo].[TTDOCC_ANIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU_CLIE] [dbo].[TD_VC_020] NOT NULL,
[CO_CLIE] [dbo].[TD_VC_020] NOT NULL,
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTDOCC_AN__NU_PR__3E131840] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTDOCC_AN__CO_US__3F073C79] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTDOCC_AN__FE_US__3FFB60B2] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTDOCC_AN__CO_US__40EF84EB] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTDOCC_AN__FE_US__41E3A924] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTDOCC_ANIN] ADD CONSTRAINT [PK__TTDOCC_A__380D472426467BA7] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_TIPO_DOCU], [NU_DOCU_CLIE], [CO_CLIE], [NU_PROC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTDOCC_ANIN] ADD CONSTRAINT [FK__TTDOCC_ANIN__536E27D9] FOREIGN KEY ([CO_EMPR], [CO_CLIE], [CO_TIPO_DOCU], [NU_DOCU_CLIE]) REFERENCES [dbo].[TTDOCC_ANUL] ([CO_EMPR], [CO_CLIE], [CO_TIPO_DOCU], [NU_DOCU_CLIE])
GO
